<option value="0" <%= branch == 0 ? "selected" : "" %>>请选择分支</option>
<%
for (var project in branchList) { var branches = branchList[project];
%>
<optgroup label="<%= project %>">
    <%
    for (var i in branches) { var branchItem = branches[i];
    %>
    <option value="<%= branchItem %>" <%= ((branchItem.indexOf(branch) > 0 || branchItem == branch) && branch != '0') ? "selected" : "" %>><%= branchItem %></option>
    <%
    };
    %>
</optgroup>
<%
};
%>